home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / python / maclibnx.lha / perror.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-14  |  246 b   |  14 lines

  1. /* Perror emulator.
  2.    Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). */
  3.  
  4. #include <stdio.h>
  5. #include <errno.h>
  6.  
  7. perror(str)
  8.     char *str;
  9. {
  10.     if (str != NULL)
  11.         fprintf(stderr, "%s: ", str);
  12.     fprintf(stderr, "Error %d\n", errno);
  13. }
  14.